-
Notifications
You must be signed in to change notification settings - Fork 84
Syncing fix #439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syncing fix #439
Conversation
📝 WalkthroughWalkthroughThis PR implements per-app synchronization tracking in SteamService using a ConcurrentHashMap to manage concurrent operations on different apps, and introduces a new dialog flow that allows users to launch an app even when cloud sync is in progress, with corresponding localization strings across multiple languages. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI as PluviaMain UI
participant Service as SteamService
participant Dialog as Dialog Flow
User->>UI: Attempt to Launch App
UI->>Service: preLaunchApp(appId)
Service->>Service: tryAcquireSync(appId)
alt Sync Already In Progress
Service-->>UI: InProgress Result
UI->>Dialog: Show SYNC_IN_PROGRESS Dialog
User->>Dialog: Choose Action
alt User Selects "Launch Anyway"
Dialog->>UI: preLaunchApp(skipCloudSync=true)
UI->>Service: beginLaunchApp (without sync)
Service-->>UI: Launch Success
Service->>Service: releaseSync(appId)
else User Selects "Wait"
Dialog-->>User: Dismiss Dialog
end
else Sync Not In Progress
Service->>Service: Proceed with Cloud Sync
Service-->>UI: Sync Success
UI->>UI: Launch App
Service->>Service: releaseSync(appId)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@app/src/main/res/values-da/strings.xml`:
- Around line 578-580: The Danish string
main_sync_in_progress_launch_anyway_message uses "Cloud-synkronisering" but
other strings use "Sky-synkronisering"; update the message text to replace
"Cloud-synkronisering" with "Sky-synkronisering" so terminology is consistent
with existing keys like library_cloud_sync_*, keeping the rest of the sentence
intact and leaving string name main_sync_in_progress_launch_anyway_message,
main_launch_anyway and main_wait unchanged.
| <string name="main_sync_in_progress_launch_anyway_message">Cloud-synkronisering for dette spil er allerede i gang. Du kan vente og prøve igen eller starte alligevel uden synkronisering (kan give konflikter i gemte filer).</string> | ||
| <string name="main_launch_anyway">Start alligevel</string> | ||
| <string name="main_wait">Vent</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align terminology with existing “Sky‑synkronisering”.
Other Danish strings use “Sky‑synkronisering” (e.g., library_cloud_sync_*), but this new line says “Cloud‑synkronisering”. Consider aligning for consistency.
♻️ Suggested tweak
- <string name="main_sync_in_progress_launch_anyway_message">Cloud-synkronisering for dette spil er allerede i gang. Du kan vente og prøve igen eller starte alligevel uden synkronisering (kan give konflikter i gemte filer).</string>
+ <string name="main_sync_in_progress_launch_anyway_message">Sky-synkronisering for dette spil er allerede i gang. Du kan vente og prøve igen eller starte alligevel uden synkronisering (kan give konflikter i gemte filer).</string>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <string name="main_sync_in_progress_launch_anyway_message">Cloud-synkronisering for dette spil er allerede i gang. Du kan vente og prøve igen eller starte alligevel uden synkronisering (kan give konflikter i gemte filer).</string> | |
| <string name="main_launch_anyway">Start alligevel</string> | |
| <string name="main_wait">Vent</string> | |
| <string name="main_sync_in_progress_launch_anyway_message">Sky-synkronisering for dette spil er allerede i gang. Du kan vente og prøve igen eller starte alligevel uden synkronisering (kan give konflikter i gemte filer).</string> | |
| <string name="main_launch_anyway">Start alligevel</string> | |
| <string name="main_wait">Vent</string> |
🤖 Prompt for AI Agents
In `@app/src/main/res/values-da/strings.xml` around lines 578 - 580, The Danish
string main_sync_in_progress_launch_anyway_message uses "Cloud-synkronisering"
but other strings use "Sky-synkronisering"; update the message text to replace
"Cloud-synkronisering" with "Sky-synkronisering" so terminology is consistent
with existing keys like library_cloud_sync_*, keeping the rest of the sentence
intact and leaving string name main_sync_in_progress_launch_anyway_message,
main_launch_anyway and main_wait unchanged.
Summary by cubic
Fixes “sync in progress” deadlocks by switching to per-app sync locks and adds a “launch anyway” path when cloud sync is busy. Also improves game shutdown by exiting the container cleanly and forces the correct executable to fullscreen.
Bug Fixes
New Features
Written for commit 4e47188. Summary will update on new commits.
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.